<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 给p元素设置字体颜色 */
        /* 会选取到.box元素下的所有p */
        .box p {
            color: red;
        }
    </style>
</head>

<body>
    <div class="box">
        div
        <p>p</p>
        <div>
            <p>p2</p>
        </div>
    </div>
    <div>
        div1
        <p>p1</p>
    </div>
</body>

</html>